import Vue from 'vue'
import App from './App.vue'
import { setupRouter } from './router'
import { setupRouterGuard } from './router/guard'
import { setupPiniaStore, setupVuexStore } from './store'
import { registerAntd, registerElement } from "@/plugins"
import { setupGlobDirectives } from "@/directives"
import 'ant-design-vue/dist/antd.less';

// elememtui主题颜色、样式覆盖设置
import "@/theme/elementui/index.scss"

Vue.config.productionTip = false

// 注册pinia
setupPiniaStore()

// 注册vuex
let store = setupVuexStore()
// 注册router
let router = setupRouter()

// 注册ant-design-vue 按需引入
registerAntd(Vue)

// 注册elementUi 按需引入
registerElement(Vue)

// 注册路由守卫
setupRouterGuard(router)

// 注册全局指令
setupGlobDirectives()

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
